package test10;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) throws ParseException {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入年龄：");
        String str = sc.next();
        int age = Integer.parseInt(str);
        System.out.println("请输入分数");
        String score = sc.next();
        double score1 = Double.parseDouble(score);
        System.out.println("请输入入学时间：");
        String time = sc.next();
        DateFormat df = new SimpleDateFormat(time);//获取日期格式
        Date parse = df.parse(time);//解析时间
        System.out.println("年龄：" + age + "分数：" + score1 + "入学时间：" +parse);
    }
}
